The popovers may return keyboard grabs to previous widgets, so if
called after unsetting the focus, the window may be left with a
dangling GtkWidget that would cause crash at later dispose() calls.
GtkWindow *window = GTK_WINDOW (object);
GtkWindowPrivate *priv = window->priv;
+ g_hash_table_remove_all (priv->popovers);
+
gtk_window_set_focus (window, NULL);
gtk_window_set_default (window, NULL);
unset_titlebar (window);
remove_attach_widget (window);
- g_hash_table_remove_all (priv->popovers);
-
G_OBJECT_CLASS (gtk_window_parent_class)->dispose (object);
}